﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace LevelEditor
{
    public partial class mainWindow : Form
    {
        public mainWindow()
        {
            InitializeComponent();
            mainMenuInteraction = new MainMenuInteraction();
            Render2D.Instance.init(pictureBox1.CreateGraphics());
        }

        private void menuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {

        }

        private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            mainMenuInteraction.showAboutBox();
        }

        private MainMenuInteraction mainMenuInteraction;

        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            mainMenuInteraction.showOpenFileDialog();
        }

        private void saveToolStripMenuItem_Click(object sender, EventArgs e)
        {
            mainMenuInteraction.showSaveFileDialog();
        }

        private void mainWindow_FormClosing(object sender, FormClosingEventArgs e)
        {
            mainMenuInteraction.setSavingFile();
        }

        private void pictureBox1_Paint(object sender, PaintEventArgs e)
        {
            Render2D.Instance.draw();
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {
            Render2D.Instance.draw();
        }

        
    }
}
